package com.qiangua.lixin.qianguakeji;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.ListView;

/**
 * Created by Administrator on 2015/7/31 0031.
 */
public class SetActivity extends Activity {
    private ListView mListView;
    private ImageView mImageView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.setting);
        mListView = (ListView) findViewById(R.id.listview_st);
        mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                switch(position){
                    case(7):
                        finish();
                        break;
                    case (6):
                        Intent intent = new Intent(SetActivity.this,GuaYu.class);
                        startActivity(intent);
                }
            }
        });
        mImageView = (ImageView) findViewById(R.id.imagebutton_st1);

        mImageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(SetActivity.this,SlidingMenu.class);
                startActivity(intent);
            }
        });

        String[] array = {"昵称","手机绑定","续费充值","消息推送","意见反馈","使用帮助","关于牵挂","退出"};
        ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,array);
        mListView.setAdapter(arrayAdapter);
    }
}
